package com.tiantang.hbase;

import java.io.IOException;

import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class WeiBoTest {
	
	private Logger logger=LoggerFactory.getLogger(WeiBoTest.class);
	
	private WeiBo weiBo=new WeiBo();
	
	@Test
	public void testInit() throws IOException{
		boolean result=weiBo.init();
		logger.info("初始化表的结果：result={}",result);
	}
	
	@Test
	public void testPublish() throws IOException{
		boolean result = weiBo.publish("1001", "Good Good Study,Day Day Up 1");
		weiBo.publish("1001", "Good Good Study,Day Day Up 2");
		weiBo.publish("1001", "Good Good Study,Day Day Up 3");
		weiBo.publish("1001", "Good Good Study,Day Day Up 4");
		weiBo.publish("1001", "Good Good Study,Day Day Up 5");
		weiBo.publish("1001", "Good Good Study,Day Day Up 6");
		logger.info("发布微博的结果为：result={}",result);
	}
	
	@Test
	public void testAttend() throws IOException{
		boolean result=weiBo.attend("1002", "1001");
		logger.info("关注操作的结果为: result={}",result);
	}
	
	@Test
	public void testUnFollow() throws IOException{
		boolean result=weiBo.unfollow("1002", "1001");
		logger.info("取关的结果为:result={}",result);
	}
	
	@Test
	public void testBrowse() throws IOException{
		weiBo.browse("1002");
	}

}
